<?php

function make(): int
{
    static $count = 0;
    $count++;
    return $count;
}
echo make().PHP_EOL; // 1
echo make().PHP_EOL; // 2
echo make().PHP_EOL; // 3